package com.shareach.dao.mongoext;

import java.util.List;

import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

import com.shareach.domain.BizCardDomain;

public interface ExtBizCardDao extends MongoRepository<BizCardDomain, String> {

	@Override
	public List<BizCardDomain> findAll();

	@Query(value = "{'title':{'$regex':?0,'$options':'i'}}", fields = "{'outId':1,'title':1}")
	public List<BizCardDomain> findByCondition(String title, String id);

	@Query(value = "{'bank':?0}", fields = "{'outId':1}")
	public List<BizCardDomain> findByBank(Integer bankId);
}
